var ns;
var app = new Vue({
    el: '#app',
    data: {
        form: {
            content: ''
        },
        imageurl: '',
        isUserAgreement: false,
        Type:1,
        answer:1
    },
    methods: {
        get_data: function() {
            var that = this;
            ns.post({
                action: 'getuserregistercontent',
                Type:that.Type
            }, function(succeed, data, err) {
                console.log(JSON.stringify(succeed));
                console.log(JSON.stringify(data));
                if (succeed) {
                    that.form.content = data.content;
                }
            });
        },
        do_agree: function() {
            var that = this;
            api.closeWin();
        },
        btnOk:function(){
            var that=this;
            api.sendEvent({
                name: 'do_agree'
            });
        },
        btnNo:function(){
            api.closeWidget({
                silent:true
            });
        },
        gb_close:function(){
            var that=this;
            that.closeframe();
        },
        closeframe:function(){
            api.closeFrame();
        }
    }
});
apiready = function() {
    api.parseTapmode();
    ns = window.Foresight.Util;
    app.Type = api.pageParam.Type;
    app.answer = api.pageParam.answer||0;
    app.get_data();
};
